<?php

namespace app\model;

use think\Model;

class CourseWare extends Model
{
    protected $pk = 'id'; // 设置主键
    protected $name = 'course_ware'; // 设置表名

    public function file()
    {
        return $this->hasMany(CourseWareFile::class, 'pid', 'id');
    }
}